<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>template模版</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script type="text/javascript" src="../assets/js/vue.js"></script>
</head>

<body>
    <h1>template模版</h1>
    <a href="../index.html">返回</a>
    <hr />
    <div id="app">
        {{message}}
    </div>
    <h3>template标签</h3>
    <template id="dd2">
        <h2 style="color:blue;">这个是template标签模版dd2</h2>
    </template>
    <h3>script模版</h3>
    <script type="x-template" id="dd3">
        <h2 style="color:red;">这个是template标签模版dd3</h2>
    </script>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                message: "hello world"
            },
            //1. 使用`` 不使用' 和" 就是为防止内部冲突
            // template: `
            //     <h2 style="color:red">这个是template模版</h2>
            // `

            //2. template 标签模版
            template: "#dd3"

            //3.
        });
    </script>
</body>

</html>